use super::Color;

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Cell {
    Empty,
    Routed(Color),
}

impl Cell {
    pub fn is_empty(&self) -> bool {
        match self {
            Cell::Empty => true,
            _ => false,
        }
    }

    pub fn is_routed(&self) -> bool {
        match self {
            Cell::Routed(_) => true,
            _ => false,
        }
    }

    pub fn color(&self) -> Color {
        match self {
            Cell::Empty => Color::white(),
            Cell::Routed(c) => *c,
        }
    }
}
